<!DOCTYPE HTML>

<html lang="en">
<head>

<title>AbstractPreAuthenticatedProcessingFilter (spring-security-docs 5.6.3 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="AbstractPreAuthenticatedProcessingFilter (spring-security-docs 5.6.3 API)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":6,"i4":6,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">

<div class="topNav"><a id="navbar.top">

</a>
<div class="skipNav"><a href="AbstractPreAuthenticatedProcessingFilter.html#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">

</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="AbstractPreAuthenticatedProcessingFilter.html#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="AbstractPreAuthenticatedProcessingFilter.html#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="AbstractPreAuthenticatedProcessingFilter.html#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="AbstractPreAuthenticatedProcessingFilter.html#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="AbstractPreAuthenticatedProcessingFilter.html#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">

</a></div>

</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>

<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.springframework.security.web.authentication.preauth</a></div>
<h2 title="Class AbstractPreAuthenticatedProcessingFilter" class="title">Class AbstractPreAuthenticatedProcessingFilter</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.springframework.web.filter.GenericFilterBean</li>
<li>
<ul class="inheritance">
<li>org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code>javax.servlet.Filter</code>, <code>org.springframework.beans.factory.Aware</code>, <code>org.springframework.beans.factory.BeanNameAware</code>, <code>org.springframework.beans.factory.DisposableBean</code>, <code>org.springframework.beans.factory.InitializingBean</code>, <code>org.springframework.context.ApplicationEventPublisherAware</code>, <code>org.springframework.context.EnvironmentAware</code>, <code>org.springframework.core.env.EnvironmentCapable</code>, <code>org.springframework.web.context.ServletContextAware</code></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="j2ee/J2eePreAuthenticatedProcessingFilter.html" title="class in org.springframework.security.web.authentication.preauth.j2ee">J2eePreAuthenticatedProcessingFilter</a></code>, <code><a href="RequestAttributeAuthenticationFilter.html" title="class in org.springframework.security.web.authentication.preauth">RequestAttributeAuthenticationFilter</a></code>, <code><a href="RequestHeaderAuthenticationFilter.html" title="class in org.springframework.security.web.authentication.preauth">RequestHeaderAuthenticationFilter</a></code>, <code><a href="websphere/WebSpherePreAuthenticatedProcessingFilter.html" title="class in org.springframework.security.web.authentication.preauth.websphere">WebSpherePreAuthenticatedProcessingFilter</a></code>, <code><a href="x509/X509AuthenticationFilter.html" title="class in org.springframework.security.web.authentication.preauth.x509">X509AuthenticationFilter</a></code></dd>
</dl>
<hr>
<pre>public abstract class <span class="typeNameLabel">AbstractPreAuthenticatedProcessingFilter</span>
extends org.springframework.web.filter.GenericFilterBean
implements org.springframework.context.ApplicationEventPublisherAware</pre>
<div class="block">Base class for processing filters that handle pre-authenticated authentication
requests, where it is assumed that the principal has already been authenticated by an
external system.
<p>
The purpose is then only to extract the necessary information on the principal from the
incoming request, rather than to authenticate them. External authentication systems may
provide this information via request data such as headers or cookies which the
pre-authentication system can extract. It is assumed that the external system is
responsible for the accuracy of the data and preventing the submission of forged
values.
Subclasses must implement the <code>getPreAuthenticatedPrincipal()</code> and
<code>getPreAuthenticatedCredentials()</code> methods. Subclasses of this filter are
typically used in combination with a <code>PreAuthenticatedAuthenticationProvider</code>,
which is used to load additional data for the user. This provider will reject null
credentials, so the <a href="AbstractPreAuthenticatedProcessingFilter.html#getPreAuthenticatedCredentials(javax.servlet.http.HttpServletRequest)"><code>getPreAuthenticatedCredentials(javax.servlet.http.HttpServletRequest)</code></a> method should not return
null for a valid principal.
<p>
If the security context already contains an <code>Authentication</code> object (either from
a invocation of the filter or because of some other authentication mechanism), the
filter will do nothing by default. You can force it to check for a change in the
principal by setting the <a href="AbstractPreAuthenticatedProcessingFilter.html#setCheckForPrincipalChanges(boolean)"><code>checkForPrincipalChanges</code></a> property.
<p>
By default, the filter chain will proceed when an authentication attempt fails in order
to allow other authentication mechanisms to process the request. To reject the
credentials immediately, set the
<tt>continueFilterChainOnUnsuccessfulAuthentication</tt> flag to false. The exception
raised by the <tt>AuthenticationManager</tt> will the be re-thrown. Note that this will
not affect cases where the principal returned by <a href="AbstractPreAuthenticatedProcessingFilter.html#getPreAuthenticatedPrincipal(javax.servlet.http.HttpServletRequest)"><code>getPreAuthenticatedPrincipal(javax.servlet.http.HttpServletRequest)</code></a>
is null, when the chain will still proceed as normal.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">

<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">

</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.springframework.web.filter.GenericFilterBean">

</a>
<h3>Fields inherited from class&nbsp;org.springframework.web.filter.GenericFilterBean</h3>
<code>logger</code></li>
</ul>
</li>
</ul>
</section>

<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">

</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="AbstractPreAuthenticatedProcessingFilter.html#%3Cinit%3E()">AbstractPreAuthenticatedProcessingFilter</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>

<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">

</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="AbstractPreAuthenticatedProcessingFilter.html#afterPropertiesSet()">afterPropertiesSet</a></span>()</code></th>
<td class="colLast">
<div class="block">Check whether all required properties have been set.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="AbstractPreAuthenticatedProcessingFilter.html#doFilter(javax.servlet.ServletRequest,javax.servlet.ServletResponse,javax.servlet.FilterChain)">doFilter</a></span>&#8203;(javax.servlet.ServletRequest&nbsp;request,
javax.servlet.ServletResponse&nbsp;response,
javax.servlet.FilterChain&nbsp;chain)</code></th>
<td class="colLast">
<div class="block">Try to authenticate a pre-authenticated user with Spring Security if the user has
not yet been authenticated.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>protected <a href="../../../authentication/AuthenticationDetailsSource.html" title="interface in org.springframework.security.authentication">AuthenticationDetailsSource</a>&lt;javax.servlet.http.HttpServletRequest,&#8203;?&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="AbstractPreAuthenticatedProcessingFilter.html#getAuthenticationDetailsSource()">getAuthenticationDetailsSource</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected abstract java.lang.Object</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="AbstractPreAuthenticatedProcessingFilter.html#getPreAuthenticatedCredentials(javax.servlet.http.HttpServletRequest)">getPreAuthenticatedCredentials</a></span>&#8203;(javax.servlet.http.HttpServletRequest&nbsp;request)</code></th>
<td class="colLast">
<div class="block">Override to extract the credentials (if applicable) from the current request.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>protected abstract java.lang.Object</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="AbstractPreAuthenticatedProcessingFilter.html#getPreAuthenticatedPrincipal(javax.servlet.http.HttpServletRequest)">getPreAuthenticatedPrincipal</a></span>&#8203;(javax.servlet.http.HttpServletRequest&nbsp;request)</code></th>
<td class="colLast">
<div class="block">Override to extract the principal information from the current request</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="AbstractPreAuthenticatedProcessingFilter.html#principalChanged(javax.servlet.http.HttpServletRequest,org.springframework.security.core.Authentication)">principalChanged</a></span>&#8203;(javax.servlet.http.HttpServletRequest&nbsp;request,
<a href="../../../core/Authentication.html" title="interface in org.springframework.security.core">Authentication</a>&nbsp;currentAuthentication)</code></th>
<td class="colLast">
<div class="block">Determines if the current principal has changed.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="AbstractPreAuthenticatedProcessingFilter.html#setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher)">setApplicationEventPublisher</a></span>&#8203;(org.springframework.context.ApplicationEventPublisher&nbsp;anApplicationEventPublisher)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="AbstractPreAuthenticatedProcessingFilter.html#setAuthenticationDetailsSource(org.springframework.security.authentication.AuthenticationDetailsSource)">setAuthenticationDetailsSource</a></span>&#8203;(<a href="../../../authentication/AuthenticationDetailsSource.html" title="interface in org.springframework.security.authentication">AuthenticationDetailsSource</a>&lt;javax.servlet.http.HttpServletRequest,&#8203;?&gt;&nbsp;authenticationDetailsSource)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="AbstractPreAuthenticatedProcessingFilter.html#setAuthenticationFailureHandler(org.springframework.security.web.authentication.AuthenticationFailureHandler)">setAuthenticationFailureHandler</a></span>&#8203;(<a href="../AuthenticationFailureHandler.html" title="interface in org.springframework.security.web.authentication">AuthenticationFailureHandler</a>&nbsp;authenticationFailureHandler)</code></th>
<td class="colLast">
<div class="block">Sets the strategy used to handle a failed authentication.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="AbstractPreAuthenticatedProcessingFilter.html#setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager)">setAuthenticationManager</a></span>&#8203;(<a href="../../../authentication/AuthenticationManager.html" title="interface in org.springframework.security.authentication">AuthenticationManager</a>&nbsp;authenticationManager)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="AbstractPreAuthenticatedProcessingFilter.html#setAuthenticationSuccessHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler)">setAuthenticationSuccessHandler</a></span>&#8203;(<a href="../AuthenticationSuccessHandler.html" title="interface in org.springframework.security.web.authentication">AuthenticationSuccessHandler</a>&nbsp;authenticationSuccessHandler)</code></th>
<td class="colLast">
<div class="block">Sets the strategy used to handle a successful authentication.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="AbstractPreAuthenticatedProcessingFilter.html#setCheckForPrincipalChanges(boolean)">setCheckForPrincipalChanges</a></span>&#8203;(boolean&nbsp;checkForPrincipalChanges)</code></th>
<td class="colLast">
<div class="block">If set, the pre-authenticated principal will be checked on each request and
compared against the name of the current <tt>Authentication</tt> object.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="AbstractPreAuthenticatedProcessingFilter.html#setContinueFilterChainOnUnsuccessfulAuthentication(boolean)">setContinueFilterChainOnUnsuccessfulAuthentication</a></span>&#8203;(boolean&nbsp;shouldContinue)</code></th>
<td class="colLast">
<div class="block">If set to <code>true</code> (the default), any <code>AuthenticationException</code> raised by
the <code>AuthenticationManager</code> will be swallowed, and the request will be
allowed to proceed, potentially using alternative authentication mechanisms.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="AbstractPreAuthenticatedProcessingFilter.html#setInvalidateSessionOnPrincipalChange(boolean)">setInvalidateSessionOnPrincipalChange</a></span>&#8203;(boolean&nbsp;invalidateSessionOnPrincipalChange)</code></th>
<td class="colLast">
<div class="block">If <tt>checkForPrincipalChanges</tt> is set, and a change of principal is detected,
determines whether any existing session should be invalidated before proceeding to
authenticate the new principal.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="AbstractPreAuthenticatedProcessingFilter.html#setRequiresAuthenticationRequestMatcher(org.springframework.security.web.util.matcher.RequestMatcher)">setRequiresAuthenticationRequestMatcher</a></span>&#8203;(<a href="../../util/matcher/RequestMatcher.html" title="interface in org.springframework.security.web.util.matcher">RequestMatcher</a>&nbsp;requiresAuthenticationRequestMatcher)</code></th>
<td class="colLast">
<div class="block">Sets the request matcher to check whether to proceed the request further.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="AbstractPreAuthenticatedProcessingFilter.html#successfulAuthentication(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,org.springframework.security.core.Authentication)">successfulAuthentication</a></span>&#8203;(javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.http.HttpServletResponse&nbsp;response,
<a href="../../../core/Authentication.html" title="interface in org.springframework.security.core">Authentication</a>&nbsp;authResult)</code></th>
<td class="colLast">
<div class="block">Puts the <code>Authentication</code> instance returned by the authentication
manager into the secure context.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="AbstractPreAuthenticatedProcessingFilter.html#unsuccessfulAuthentication(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,org.springframework.security.core.AuthenticationException)">unsuccessfulAuthentication</a></span>&#8203;(javax.servlet.http.HttpServletRequest&nbsp;request,
javax.servlet.http.HttpServletResponse&nbsp;response,
<a href="../../../core/AuthenticationException.html" title="class in org.springframework.security.core">AuthenticationException</a>&nbsp;failed)</code></th>
<td class="colLast">
<div class="block">Ensures the authentication object in the secure context is set to null when
authentication fails.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.springframework.web.filter.GenericFilterBean">

</a>
<h3>Methods inherited from class&nbsp;org.springframework.web.filter.GenericFilterBean</h3>
<code>addRequiredProperty, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">

</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">

<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">

</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;()">

</a>
<ul class="blockListLast">
<li class="blockList">
<h4>AbstractPreAuthenticatedProcessingFilter</h4>
<pre>public&nbsp;AbstractPreAuthenticatedProcessingFilter()</pre>
</li>
</ul>
</li>
</ul>
</section>

<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">

</a>
<h3>Method Detail</h3>
<a id="afterPropertiesSet()">

</a>
<ul class="blockList">
<li class="blockList">
<h4>afterPropertiesSet</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;afterPropertiesSet()</pre>
<div class="block">Check whether all required properties have been set.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>afterPropertiesSet</code>&nbsp;in interface&nbsp;<code>org.springframework.beans.factory.InitializingBean</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>afterPropertiesSet</code>&nbsp;in class&nbsp;<code>org.springframework.web.filter.GenericFilterBean</code></dd>
</dl>
</li>
</ul>
<a id="doFilter(javax.servlet.ServletRequest,javax.servlet.ServletResponse,javax.servlet.FilterChain)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>doFilter</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;doFilter&#8203;(javax.servlet.ServletRequest&nbsp;request,
                     javax.servlet.ServletResponse&nbsp;response,
                     javax.servlet.FilterChain&nbsp;chain)
              throws java.io.IOException,
                     javax.servlet.ServletException</pre>
<div class="block">Try to authenticate a pre-authenticated user with Spring Security if the user has
not yet been authenticated.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>doFilter</code>&nbsp;in interface&nbsp;<code>javax.servlet.Filter</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
<dd><code>javax.servlet.ServletException</code></dd>
</dl>
</li>
</ul>
<a id="principalChanged(javax.servlet.http.HttpServletRequest,org.springframework.security.core.Authentication)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>principalChanged</h4>
<pre class="methodSignature">protected&nbsp;boolean&nbsp;principalChanged&#8203;(javax.servlet.http.HttpServletRequest&nbsp;request,
                                   <a href="../../../core/Authentication.html" title="interface in org.springframework.security.core">Authentication</a>&nbsp;currentAuthentication)</pre>
<div class="block">Determines if the current principal has changed. The default implementation tries
<ul>
<li>If the <a href="AbstractPreAuthenticatedProcessingFilter.html#getPreAuthenticatedPrincipal(javax.servlet.http.HttpServletRequest)"><code>getPreAuthenticatedPrincipal(HttpServletRequest)</code></a> is a String,
the <code>Principal.getName()</code> is compared against the pre authenticated
principal</li>
<li>Otherwise, the <a href="AbstractPreAuthenticatedProcessingFilter.html#getPreAuthenticatedPrincipal(javax.servlet.http.HttpServletRequest)"><code>getPreAuthenticatedPrincipal(HttpServletRequest)</code></a> is
compared against the <a href="../../../core/Authentication.html#getPrincipal()"><code>Authentication.getPrincipal()</code></a>
</ul>
<p>
Subclasses can override this method to determine when a principal has changed.
</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>request</code> - </dd>
<dd><code>currentAuthentication</code> - </dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the principal has changed, else false</dd>
</dl>
</li>
</ul>
<a id="successfulAuthentication(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,org.springframework.security.core.Authentication)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>successfulAuthentication</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;successfulAuthentication&#8203;(javax.servlet.http.HttpServletRequest&nbsp;request,
                                        javax.servlet.http.HttpServletResponse&nbsp;response,
                                        <a href="../../../core/Authentication.html" title="interface in org.springframework.security.core">Authentication</a>&nbsp;authResult)
                                 throws java.io.IOException,
                                        javax.servlet.ServletException</pre>
<div class="block">Puts the <code>Authentication</code> instance returned by the authentication
manager into the secure context.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
<dd><code>javax.servlet.ServletException</code></dd>
</dl>
</li>
</ul>
<a id="unsuccessfulAuthentication(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,org.springframework.security.core.AuthenticationException)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>unsuccessfulAuthentication</h4>
<pre class="methodSignature">protected&nbsp;void&nbsp;unsuccessfulAuthentication&#8203;(javax.servlet.http.HttpServletRequest&nbsp;request,
                                          javax.servlet.http.HttpServletResponse&nbsp;response,
                                          <a href="../../../core/AuthenticationException.html" title="class in org.springframework.security.core">AuthenticationException</a>&nbsp;failed)
                                   throws java.io.IOException,
                                          javax.servlet.ServletException</pre>
<div class="block">Ensures the authentication object in the secure context is set to null when
authentication fails.
<p>
Caches the failure exception as a request attribute</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
<dd><code>javax.servlet.ServletException</code></dd>
</dl>
</li>
</ul>
<a id="setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>setApplicationEventPublisher</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setApplicationEventPublisher&#8203;(org.springframework.context.ApplicationEventPublisher&nbsp;anApplicationEventPublisher)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>setApplicationEventPublisher</code>&nbsp;in interface&nbsp;<code>org.springframework.context.ApplicationEventPublisherAware</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>anApplicationEventPublisher</code> - The ApplicationEventPublisher to use</dd>
</dl>
</li>
</ul>
<a id="setAuthenticationDetailsSource(org.springframework.security.authentication.AuthenticationDetailsSource)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>setAuthenticationDetailsSource</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setAuthenticationDetailsSource&#8203;(<a href="../../../authentication/AuthenticationDetailsSource.html" title="interface in org.springframework.security.authentication">AuthenticationDetailsSource</a>&lt;javax.servlet.http.HttpServletRequest,&#8203;?&gt;&nbsp;authenticationDetailsSource)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>authenticationDetailsSource</code> - The AuthenticationDetailsSource to use</dd>
</dl>
</li>
</ul>
<a id="getAuthenticationDetailsSource()">

</a>
<ul class="blockList">
<li class="blockList">
<h4>getAuthenticationDetailsSource</h4>
<pre class="methodSignature">protected&nbsp;<a href="../../../authentication/AuthenticationDetailsSource.html" title="interface in org.springframework.security.authentication">AuthenticationDetailsSource</a>&lt;javax.servlet.http.HttpServletRequest,&#8203;?&gt;&nbsp;getAuthenticationDetailsSource()</pre>
</li>
</ul>
<a id="setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>setAuthenticationManager</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setAuthenticationManager&#8203;(<a href="../../../authentication/AuthenticationManager.html" title="interface in org.springframework.security.authentication">AuthenticationManager</a>&nbsp;authenticationManager)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>authenticationManager</code> - The AuthenticationManager to use</dd>
</dl>
</li>
</ul>
<a id="setContinueFilterChainOnUnsuccessfulAuthentication(boolean)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>setContinueFilterChainOnUnsuccessfulAuthentication</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setContinueFilterChainOnUnsuccessfulAuthentication&#8203;(boolean&nbsp;shouldContinue)</pre>
<div class="block">If set to <code>true</code> (the default), any <code>AuthenticationException</code> raised by
the <code>AuthenticationManager</code> will be swallowed, and the request will be
allowed to proceed, potentially using alternative authentication mechanisms. If
<code>false</code>, authentication failure will result in an immediate exception.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>shouldContinue</code> - set to <code>true</code> to allow the request to proceed after a
failed authentication.</dd>
</dl>
</li>
</ul>
<a id="setCheckForPrincipalChanges(boolean)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>setCheckForPrincipalChanges</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setCheckForPrincipalChanges&#8203;(boolean&nbsp;checkForPrincipalChanges)</pre>
<div class="block">If set, the pre-authenticated principal will be checked on each request and
compared against the name of the current <tt>Authentication</tt> object. A check to
determine if <a href="../../../core/Authentication.html#getPrincipal()"><code>Authentication.getPrincipal()</code></a> is equal to the principal will
also be performed. If a change is detected, the user will be reauthenticated.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>checkForPrincipalChanges</code> - </dd>
</dl>
</li>
</ul>
<a id="setInvalidateSessionOnPrincipalChange(boolean)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>setInvalidateSessionOnPrincipalChange</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setInvalidateSessionOnPrincipalChange&#8203;(boolean&nbsp;invalidateSessionOnPrincipalChange)</pre>
<div class="block">If <tt>checkForPrincipalChanges</tt> is set, and a change of principal is detected,
determines whether any existing session should be invalidated before proceeding to
authenticate the new principal.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>invalidateSessionOnPrincipalChange</code> - <tt>false</tt> to retain the existing
session. Defaults to <tt>true</tt>.</dd>
</dl>
</li>
</ul>
<a id="setAuthenticationSuccessHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>setAuthenticationSuccessHandler</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setAuthenticationSuccessHandler&#8203;(<a href="../AuthenticationSuccessHandler.html" title="interface in org.springframework.security.web.authentication">AuthenticationSuccessHandler</a>&nbsp;authenticationSuccessHandler)</pre>
<div class="block">Sets the strategy used to handle a successful authentication.</div>
</li>
</ul>
<a id="setAuthenticationFailureHandler(org.springframework.security.web.authentication.AuthenticationFailureHandler)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>setAuthenticationFailureHandler</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setAuthenticationFailureHandler&#8203;(<a href="../AuthenticationFailureHandler.html" title="interface in org.springframework.security.web.authentication">AuthenticationFailureHandler</a>&nbsp;authenticationFailureHandler)</pre>
<div class="block">Sets the strategy used to handle a failed authentication.</div>
</li>
</ul>
<a id="setRequiresAuthenticationRequestMatcher(org.springframework.security.web.util.matcher.RequestMatcher)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>setRequiresAuthenticationRequestMatcher</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setRequiresAuthenticationRequestMatcher&#8203;(<a href="../../util/matcher/RequestMatcher.html" title="interface in org.springframework.security.web.util.matcher">RequestMatcher</a>&nbsp;requiresAuthenticationRequestMatcher)</pre>
<div class="block">Sets the request matcher to check whether to proceed the request further.</div>
</li>
</ul>
<a id="getPreAuthenticatedPrincipal(javax.servlet.http.HttpServletRequest)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>getPreAuthenticatedPrincipal</h4>
<pre class="methodSignature">protected abstract&nbsp;java.lang.Object&nbsp;getPreAuthenticatedPrincipal&#8203;(javax.servlet.http.HttpServletRequest&nbsp;request)</pre>
<div class="block">Override to extract the principal information from the current request</div>
</li>
</ul>
<a id="getPreAuthenticatedCredentials(javax.servlet.http.HttpServletRequest)">

</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getPreAuthenticatedCredentials</h4>
<pre class="methodSignature">protected abstract&nbsp;java.lang.Object&nbsp;getPreAuthenticatedCredentials&#8203;(javax.servlet.http.HttpServletRequest&nbsp;request)</pre>
<div class="block">Override to extract the credentials (if applicable) from the current request.
Should not return null for a valid principal, though some implementations may
return a dummy value.</div>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>

<footer role="contentinfo">
<nav role="navigation">

<div class="bottomNav"><a id="navbar.bottom">

</a>
<div class="skipNav"><a href="AbstractPreAuthenticatedProcessingFilter.html#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">

</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="AbstractPreAuthenticatedProcessingFilter.html#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="AbstractPreAuthenticatedProcessingFilter.html#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="AbstractPreAuthenticatedProcessingFilter.html#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="AbstractPreAuthenticatedProcessingFilter.html#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="AbstractPreAuthenticatedProcessingFilter.html#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">

</a></div>

</nav>
</footer>
<script>if (window.parent == window) {(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-2728886-23', 'auto', {'siteSpeedSampleRate': 100});ga('send', 'pageview');}</script><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v652eace1692a40cfa3763df669d7439c1639079717194" integrity="sha512-Gi7xpJR8tSkrpF7aordPZQlW2DLtzUlZcumS8dMQjwDHEnw9I7ZLyiOj/6tZStRBGtGgN6ceN6cMH8z7etPGlw==" data-cf-beacon='{"rayId":"7040ddd9cc6097cf","token":"bffcb8a918ae4755926f76178bfbd26b","version":"2021.12.0","si":100}' crossorigin="anonymous"></script>
</body>
</html>
